/*
 * FollowupPostData.java
 *
 * Created on April 16, 2007, 2:37 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Comm.Net;

import Experience.ExpUI;
import Experience.FollowupSample;

/**
 *
 * @author dmgreen
 */
public class FollowupPostData extends PostData {
    
    /**
     * Creates a new instance of FollowupPostData
     */
    public FollowupPostData(FollowupSample fs) {
        // WAS fs.getUID();
        super (ExpUI.FUP_UPLOADER_URL, fs.getLocalSampleID());
    
        this.setMsgType(BaseData.MSGTYPE_FOLLOWUP);
        
        addGlucose(fs.getPostGlucose());
        addTags(StringifyTags(fs.getTags()));
  
        addSampleID(fs.getGlobalSampleID());
    }
    
    public void addSampleID(int s_id) {
        
        myPayload += "--" + BOUNDARY +
                "Content-Disposition: form-data; name=\"sample_id\"\r\n" +
                "Content-type: text/plain\r\n" + 
                "\r\n" +
                 s_id + "\r\n";
    }
}
